package it.xiuxian.personcenter.presenter

import com.lzy.okgo.OkGo

import it.xiuxian.lib.base.BaseBean
import it.xiuxian.lib.base.BasePresenter
import it.xiuxian.lib.base.ILoadBind
import it.xiuxian.lib.http.CallBackOption
import it.xiuxian.lib.http.HttpConfig
import it.xiuxian.personcenter.activity.AboutUsActivity
import it.xiuxian.lib.bean.ContentBean

class AboutUsActivityPresenter:BasePresenter<AboutUsActivity>() {
    fun aboutUs(){
        OkGo.post<BaseBean<ContentBean>>(HttpConfig.BASE_URL+"/apppeizhi/get")
            .execute(object : CallBackOption<BaseBean<ContentBean>>(){

            }.loadBind(mView as AboutUsActivity).execute( object : ILoadBind<BaseBean<ContentBean>> {
                override fun excute(bean: BaseBean<ContentBean>) {
                    if (bean.code==0){
                        (mView as AboutUsActivity).setUI(bean.data)
                    }
                }
            }))
    }

}